//===============================================================================
// Microsoft patterns & practices
// Web Client Software Factory
//-------------------------------------------------------------------------------
// Copyright (C) Microsoft Corporation.  All rights reserved.
// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY
// OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT
// LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
// FITNESS FOR A PARTICULAR PURPOSE.
//-------------------------------------------------------------------------------
// The example companies, organizations, products, domain names,
// e-mail addresses, logos, people, places, and events depicted
// herein are fictitious.  No association with any real company,
// organization, product, domain name, email address, logo, person,
// places, or events is intended or should be inferred.
//===============================================================================
using System;
using System.Collections;
using System.Workflow.Activities;

namespace WCSFContrib.PageFlow.WorkflowFoundation
{
	/// <summary>
	/// Describes the contract for data exchange services.
	/// </summary>
	[ExternalDataExchange]
	public interface IDataExchangeService
	{
		/// <summary>
		/// Occurs when data is set.
		/// </summary>
		event EventHandler<SetDataEventArgs> SetData;

		/// <summary>
		/// Occurs when data is requested.
		/// </summary>
		event EventHandler<DataKeyEventArgs> GetData;

		/// <summary>
		/// Occurs when data is disposed.
		/// </summary>
		event EventHandler<DataKeyEventArgs> DisposeData;

		/// <summary>
		/// Occurs when keys are requested.
		/// </summary>
		event EventHandler<DataKeyEventArgs> GetKeys;

		/// <summary>
		/// Fires the DataReturned event.
		/// </summary>
		/// <param name="instanceId">The workflow instance identifier.</param>
		/// <param name="value">The value returned.</param>
        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1030:UseEventsWhereAppropriate")]
		void FireDataReturned(Guid instanceId, object value);

		/// <summary>
		/// Fires the KeysReturned event.
		/// </summary>
		/// <param name="instanceId">The workflow instance identifier.</param>
		/// <param name="keys">The collection of returned keys.</param>
        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1030:UseEventsWhereAppropriate")]
        void FireGetKeysReturned(Guid instanceId, ICollection keys);
	}
}
